Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cephadm: fix logging defaults #32641

Merged
merged 1 commit into from
Jan 18, 2020
Merged

Conversation

liewegas
Copy link
Member

  • prefix stderr log lines with 'debug '
  • send cluster log to stderr (only affects mons)
  • default to sending cluser log to stderr only (not to file)

This aligns things with the container-y way, as we do
with rook. It means that if you want legacy behavior (log files),
you have 2 settings to change:

log_to_file = true
mon_cluster_log_to_file = true

We could default this to leave cluster log to file by default
since they aren't that big (and we do have log rotation), but
it's not as clean as it could be...

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@liewegas liewegas requested a review from a team as a code owner January 14, 2020 23:14
@liewegas liewegas requested a review from leseb January 14, 2020 23:14
@jdurgin
Copy link
Member

jdurgin commented Jan 15, 2020

is the stderr saved somewhere if the daemon crashes or otherwise stops?

@liewegas
Copy link
Member Author

liewegas commented Jan 15, 2020 via email

@liewegas
Copy link
Member Author

IIUC it goes to journald. something like journalctl -u ceph-$fsid-$type.$id to view?

confirmed

@liewegas liewegas requested a review from jdurgin January 15, 2020 21:09
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
@mgfritch
Copy link
Contributor

IIUC it goes to journald. something like journalctl -u ceph-$fsid-$type.$id to view?

confirmed

Also confirmed using: journalctl -u ceph-$fsid@$type.$id

Copy link
Contributor

@mgfritch mgfritch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@jdurgin jdurgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should document this and other differences from a non-cephadm setup in a migration doc in the future

@mgfritch
Copy link
Contributor

Perhaps cephadm should also use journalctl (See PR #32664)

This would allow for access to logs even when the container is stopped/crashed:

cephadm logs --fsid <fsid> --name <name>

- prefix stderr log lines with 'debug '
- send cluster log to stderr (only affects mons)
- default to sending cluser log to stderr only (not to file)

This aligns things with the container-y way, as we do
with rook.  It means that if you want legacy behavior (log files),
you have *2* settings to change:

 log_to_file = true
 mon_cluster_log_to_file = true

We could default this to leave cluster log to file by default
since they aren't that big (and we do have log rotation), but
it's not as clean as it could be...

Signed-off-by: Sage Weil <sage@redhat.com>
liewegas added a commit that referenced this pull request Jan 18, 2020
* refs/pull/32641/head:
	cephadm: fix logging defaults

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
@liewegas liewegas merged commit d073591 into ceph:master Jan 18, 2020
@liewegas liewegas deleted the wip-cephadm-log branch January 18, 2020 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants